﻿using Game1942.Library.Background;
using Game1942.Library.Background.Bodies;
using Game1942.Library.FlightPlans;
using System;

namespace Game1942.Library.Weapons
{
    public abstract class Ammo : ComputerElement
    {
        protected Body body;
        
        protected Ammo(bool playerTeam)
        {
            manageTurn = new TurnManager(0, 0);  //The speed is set in the constructors of each subclass
            this.playerTeam = playerTeam;
            score = 0;
            flightPlan = playerTeam ? (FlightPlan)new UpStrategy() : new DownStrategy();

        }

        public override void CrashWith(Element intruder)
        {
            Destroy();
        }

        public override void Live()
        {
            Move();
        }
    }
}
